﻿Imports System.Runtime.Serialization.Json

Namespace Extension
    Public Module JSONHelper
        <Extension>
        Public Function JSONToObj(Of T)(str As Stream) As T
            Dim ser As New DataContractJsonSerializer(GetType(T))
            Return DirectCast(ser.ReadObject(str), T)
        End Function
    End Module
End Namespace